package com.example.dao;


import com.example.pojo.Commodity;
import com.example.pojo.Params;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface CommodityDao extends Mapper<Commodity> {

    List<Commodity> findBySearch(@Param("params") Params params);
    @Select("select commodity.* ,type.name as typeName from commodity left join type on commodity.typeId = type.id")
    List<Commodity> findAll();

}
